#ifndef __MOTOR_H__
#define __MOTOR_H__

#define RCC_Motor_L1_GPIO	RCC_AHB1Periph_GPIOA
#define Motor_L1_GPIO		GPIOA
#define Motor_L1_A_Pin		GPIO_Pin_8
#define Motor_L1_B_Pin		GPIO_Pin_11

#define RCC_Motor_R1_GPIO	RCC_AHB1Periph_GPIOC
#define Motor_R1_GPIO		GPIOC
#define Motor_R1_A_Pin		GPIO_Pin_1
#define Motor_R1_B_Pin		GPIO_Pin_2


typedef struct{
	int PWM_L1;
	int PWM_L2;
	int PWM_R1;	
	int PWM_R2;	
}PWM;

void Motor_Init(void);
void Set_PWM(PWM* pwm);
void Xianfu(PWM* pwm,float xianzhi);
#endif
